package com.gopay.common.domain.acps;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

import com.gopay.common.domain.BaseEntity;

/**
 * 入账消息快照模型
 * 
 * DAO名使用AcctSnapshotDAO，manager，service同
 * 
 * @AcctSnapshot.java
 * @author yaobo
 * @2013-5-21 上午09:50:05 www.gopay.com.cn Inc.All rights reserved.
 */
@Entity
@Table(name = "ACPS_SEND_MSG_DTL")
public class AcpsSendMsgDtl extends BaseEntity {

    /**
     * 
     */
    private static final long serialVersionUID = 1160738407973025880L;

    /**
     * 编号
     */
//    @Id
//    @SequenceGenerator(name = "ACPS_SEND_MSG_DTL_SEQ", sequenceName = "ACPS_SEND_MSG_DTL_SEQ")
//    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "ACPS_SEND_MSG_DTL_SEQ")
//    @Column(name = "SQ")
//    private int id;
    @Id
    @GeneratedValue(generator = "sequenceGenerator")
    @GenericGenerator(name = "sequenceGenerator", strategy = "sequence", parameters = { @Parameter(name = "sequence", value = "ACPS_SEND_MSG_DTL_SEQ") })
    @Column(name = "SQ")
    private int id;
    
    /**
     * 订单编号
     */
    @Column(name = "GOPAY_ORDER_ID")
    private String orderId;

    /**
     * 账务快照
     */
    @Column(name = "SNAPSHOT")
    private String snapshot;

    /**
     * 入账状态
     * 
     * 00 - 待入账 01 - 入账成功 02 - 入账失败 03 - 处理中
     */
    @Column(name = "ACCTING_STATUS")
    private String status;

    /**
     * 错误码
     */
    @Column(name = "ERR_CODE")
    private String errCode;

    /**
     * 错误描述
     */
    @Column(name = "ERR_DESC")
    private String errDec;

    /**
     * 创建日期
     */
    @Column(name = "CREATED_TIME")
    private Date created;

    /**
     * 修改日期
     */
    @Column(name = "MODIFIED_TIME")
    private Date modified;

    /**
     * 入账状态
     * 
     * @AcctSnapshot.java
     * @author yaobo
     * @2013-5-21 上午10:09:13 www.gopay.com.cn Inc.All rights reserved.
     */
    public interface Status {
        /**
         * 待入账
         */
        public final String RE_ENTER = "05";//00

        /**
         * 成功
         */
        public final String ENTER_SUCCESS = "06";//01

        /**
         * 失败
         */
        public final String ENTER_FAIL = "07";//02

        /**
         * 处理中
         */
        public final String PROCESS = "08";//03
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getSnapshot() {
        return snapshot;
    }

    public void setSnapshot(String snapshot) {
        this.snapshot = snapshot;
    }

    public String getErrDec() {
        return errDec;
    }

    public void setErrDec(String errDec) {
        this.errDec = errDec;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public Date getModified() {
        return modified;
    }

    public void setModified(Date modified) {
        this.modified = modified;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getErrCode() {
        return errCode;
    }

    public void setErrCode(String errCode) {
        this.errCode = errCode;
    }
}
